#ifndef STRINGLISTENER_H
#define STRINGLISTENER_H

#include <QObject>
#include <QString>

class StringListener : public QObject
{
    Q_OBJECT

public:
    explicit StringListener(QObject *parent = nullptr);
    StringListener(const QString &str, QObject *parent = nullptr);
    StringListener(const StringListener &other);
    StringListener &operator=(const QString &other);
    StringListener &operator=(const StringListener &other);

    QString toString() const;

signals:
    void textChanged(const QString &newText);

private:
    QString m_string;
};


#endif // STRINGLISTENER_H
